package com.telenav.module.user;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageButton;

import com.telenav.app.R;
import com.telenav.module.contact.ContactListActivity;

public class InviteFriendsActivity extends Activity {
	
	private ImageButton backBtn;
	private Button goToContactBtn;
	private Button goToFriendListBtn;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) 
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.invitefriends);
		
		backBtn = (ImageButton)this.findViewById(R.id.button6);
		backBtn.setOnClickListener(new OnClickListener(){

			@Override
			public void onClick(View paramView) {
				finish();
			}
		});
		
		goToContactBtn = (Button)this.findViewById(R.id.goto_contactlist);
		goToContactBtn.setOnClickListener(new OnClickListener(){

			@Override
			public void onClick(View paramView) {
				Intent intent = new Intent();
				intent.setClass(getApplicationContext(), ContactListActivity.class);
				Bundle bundle = new Bundle();
				bundle.putString("name", "Lucy");
				intent.putExtras(bundle);
				startActivityForResult(intent, 1);
			}
		});
		
		goToFriendListBtn = (Button)this.findViewById(R.id.goto_friendlist);
		goToFriendListBtn.setOnClickListener(new OnClickListener(){

			@Override
			public void onClick(View paramView) {
				Intent intent = new Intent(InviteFriendsActivity.this, FriendListActivity.class);
				Bundle bundle = new Bundle();
				bundle.putString("classname", InviteFriendsActivity.class.getName());
				intent.putExtras(bundle);
				startActivity(intent);
			}
		});

	}
	
	@Override
	protected void onActivityResult(int requestCode, int resultCode, Intent data){
		super.onActivityResult(requestCode, resultCode, data);
		switch (resultCode) {
		case RESULT_OK:
			InviteFriendsActivity.this.finish();
			break;
		default:
			break;
		}
	}

}
